package com.glsc.ngateway.common.base.repo.mysql.gateway.platform;

import com.glsc.ngateway.common.base.domain.mysql.gateway.shortmsg.NoticeMessageSend;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

@Repository
public interface ShortMessageRepository extends JpaRepository<NoticeMessageSend, Long> {

    @Query(value = "select count(1) as count from t_notice_message_nsend_table v where if ( :beginDate is not null, v.send_date >= :beginDate , 1 = 1) and if ( :endDate is not null, v.send_date <= :endDate , 1 = 1) ", nativeQuery = true)
    Integer statShortMsgByDate(String beginDate, String endDate);
}


